package org.apogee.mil.client.main.pages.admin.forms.group;

import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.google.gwt.user.client.Element;

public class GroupContainer extends LayoutContainer{

	private GroupConfigurationComponent gcc;
	private ContentPanel cp;
	
	@Override
	protected void onRender(Element parent, int pos) {
		super.onRender(parent, pos);
		
		cp = new ContentPanel();
		cp.setHeading("Group Maintenance");
		cp.setWidth(825);
		
		gcc = new GroupConfigurationComponent();
		
		cp.add(new GroupComponent(this).asWidget());
		cp.add(gcc.asWidget());
		
		
		add(cp);
		layout();
		
	}
	
	public void resetGroupConfiguration() {
		cp.remove(gcc.asWidget());
		gcc = new GroupConfigurationComponent();
		cp.add(gcc.asWidget());
		repaint();
	}
	
}
